﻿$(function () {
    khoiTaoKhungThemThanhVien();
})

function khoiTaoKhungThemThanhVien() {
    $('#thong-tin-thanh-vien').on('keyup', function () {
        if (this.value != '') {
            var form = ($(this).parent())[0];
            _ajaxForm(
                form.getAttribute('action'),
                new FormData(form),
                'POST',
                'html',
                form.getAttribute('enctype'),
                false,
                false,
                false,
                hienThiThanhVienTimKiem,
                thongBaoLoi,
                'thong-tin-nhom-tieu-de'
            )
        }
        else {
            $('#khung-xuat-nguoi-dung').hide();
        }
    });
}

function hienThiThanhVienTimKiem(html) {
    var khung = $('#khung-xuat-nguoi-dung')
    khung.html(html);
    khung.show();
}